Skip to content

gh-153695: Fix sqlite3.Row.__hash__ with an unhashable value#153696

Merged
sobolevn merged 1 commit into
python:mainfrom
tonghuaroot:sqlite3-row-hash
Jul 14, 2026
Merged

gh-153695: Fix sqlite3.Row.__hash__ with an unhashable value#153696
sobolevn merged 1 commit into
python:mainfrom
tonghuaroot:sqlite3-row-hash

Conversation

@tonghuaroot

@tonghuaroot tonghuaroot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

sqlite3.Row.__hash__ did not check the -1 error return of PyObject_Hash,
so hashing a row that holds an unhashable value raised SystemError instead of
TypeError. Check each hash and propagate the exception.

@sobolevn sobolevn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@sobolevn sobolevn added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes and removed awaiting merge labels Jul 14, 2026
@sobolevn sobolevn enabled auto-merge (squash) July 14, 2026 22:23
@sobolevn sobolevn merged commit b704b64 into python:main Jul 14, 2026
68 checks passed
@miss-islington-app

Copy link
Copy Markdown

Thanks @tonghuaroot for the PR, and @sobolevn for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@bedevere-app

bedevere-app Bot commented Jul 14, 2026

Copy link
Copy Markdown

GH-153723 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Jul 14, 2026
@miss-islington-app

Copy link
Copy Markdown

Sorry, @tonghuaroot and @sobolevn, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker b704b647b2295924ebaf8d20ddf88925095039bb 3.13

@bedevere-app

bedevere-app Bot commented Jul 14, 2026

Copy link
Copy Markdown

GH-153724 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs backport to 3.13 bugs and security fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants